﻿using System;
using System.Linq.Expressions;

namespace Agile.DataAccess
{
    internal class ExistsBuilder<T> : BaseExistsBuilder, IExistsBuilder<T>
	{
        public ExistsBuilder(IDbCommand command, string tableName, T item)
			: base(command, tableName)
		{
			Data.Item = item;
		}
        public IExistsBuilder<T> Where(Expression<Func<T, object>> expression, DataTypes parameterType, int size)
		{
			Actions.ColumnValueAction(expression, parameterType, size);
			return this;
		}

        public IExistsBuilder<T> Where(string columnName, object value, DataTypes parameterType, int size)
		{
			Actions.ColumnValueAction(columnName, value, parameterType, size);
			return this;
		}
	}
}
